import java.util.Random;
import java.util.Scanner;

public class shitoujiandaobu {
    public static void main(String[] args) {
        int x=0,y=0;
        for(int i=1;i<6;i++) {
            System.out.println("请选择你要出的动作：0 剪刀，1 石头，2 布");
            Scanner action = new Scanner(System.in);
            int select = action.nextInt();
            int randomNumber = new Random().nextInt(3);
            System.out.println(randomNumber);
            if(-2<(select-randomNumber)&&(select-randomNumber)<2 )
            {
                if(select < randomNumber)
                {
                    x++;
                    System.out.println("你输了");
                }
                else if (select > randomNumber)
                {
                    y++;
                    System.out.println("你赢了");
                }
                else
                {
                    System.out.println("平局");
                }
            }
            if(-1>(select-randomNumber)|(select-randomNumber)>1)
            {
                if (select > randomNumber) {
                    x++;
                    System.out.println("你输了");
                }
                else if (select < randomNumber) {
                    y++;
                    System.out.println("你赢了");
                }
                else
                {
                    System.out.println("平局");
                }
            }
            }
        int z=5-y-x;
        System.out.println("你总共输的场数");
        System.out.println(x);
        System.out.println("你总共赢的场数");
        System.out.println(y);
        System.out.println("本轮平局场数为");
        System.out.println(z);
        if(x>y)
        {
            System.out.println("本轮你输了");
        }
        if(x<y)
        {
            System.out.println("本轮你赢了");
        }

        }

    }

